import App from './App'
import uviewPlus from 'uview-plus'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import "default-passive-events"
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import {getProjectCode, getProjectName} from './utils/request'
export function createApp() {
	const app = createSSRApp(App)

	app.use(uviewPlus)
	// 如此配置即可
	uni.$u.config.unit = 'rpx'
	app.config.globalProperties.$routePage = (rote) => {
		console.log(rote, 'rote', uni.$u.route)
		uni.$u.route(rote || {})
	}
	app.config.globalProperties.getProjectCode = getProjectCode
  app.config.globalProperties.getProjectName = getProjectName
	return {
		app
	}
}
// #endif
